from datetime import datetime

from pydantic import BaseModel, Field
from schemas import GMT


class MailSenderIn(BaseModel):
    name: str = Field(example="发件人邮箱")
    password: str = Field(example="邮箱授权码")
    create_name: str = Field(example="创建者")
    update_name: str = Field(example="最后更新人")
    project_id: int = Field(example="项目ID")


class MailSenderCreate(MailSenderIn):
    pass


class MailSenderUpdate(MailSenderIn):
    pass


class MailSenderOut(MailSenderIn, GMT):
    id: int = Field(example="编号")

    class Config:
        orm_mode = True
